package com.hikvision.upcproduct.service;

import com.hikvision.upc.api.TestDubboApiService;
import org.apache.dubbo.config.annotation.Service;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author :jianghui
 * @date : 2022/10/30 22:44
 */
@Service(interfaceClass = TestDubboApiService.class)
public class TestDubboApiServiceImpl implements TestDubboApiService {

    @Override
    public String sendDubboWay() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss") ;
        return "dubbo方式调用："+ simpleDateFormat.format(new Date());
    }

    @Override
    public String sendDubboWay2() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss") ;
        return "dubbo2方式调用："+ simpleDateFormat.format(new Date());
    }
}
